*(MYPROG.CMD - LESSON 10 COMMAND FILE)
CLS
SET VARIABLE vday1 DATE
SET VARIABLE vday2 DATE
FILLIN vday1 USING "Beginning date: " AT 10 10
IF vday1 FAILS THEN
  SET VARIABLE vday1 = .#DATE
ENDIF
FILLIN vday2 USING "Ending date: " AT 11 10
IF vday2 FAILS THEN
  SET VARIABLE vday2 = .#DATE
ENDIF
COMPUTE vsum AS SUM invtotal FROM transx +
  WHERE tdate GE .vday1 AND tdate LE .vday2
SET VARIABLE vday1 TEXT
SET VARIABLE vday2 TEXT
SET VARIABLE vall = ("The total for" & .vday1 & "to" & .vday2 & "is: ")
SHOW VAR vall=38 AT 13 10
SHOW VAR vsum AT 13 48
WRITE "Press any key to continue. " AT 15 10
PAUSE
CLEAR vday1 vday2 vsum vall
CLS
RETURN
